from speaker import USBSpeaker

speaker = USBSpeaker()
speaker.set_volume(0.5)
speaker.play_wav("example.wav")

if speaker.is_playing():
    print("Playing...")
else:
    print("Playback finished.")
